﻿CREATE TABLE [str].[Journal] (
    [JournalId]              INT             NOT NULL,
    [JournalLineNumber]      INT             NOT NULL,
    [AccountingPeriodId]     INT             NOT NULL,
    [EffectiveDate]          DATE            NOT NULL,
    [AdjustmentTypeId]       SMALLINT        NOT NULL,
    [CurrencyId]             SMALLINT        NOT NULL,
    [JournalOwnerId]         SMALLINT        NOT NULL,
    [JournalStatusId]        SMALLINT        NOT NULL,
    [PostingCostCentreId]    INT             NOT NULL,
    [ValueDate]              DATE            NOT NULL,
    [InputDate]              DATE            NOT NULL,
    [InputBy]                NVARCHAR (20)   NOT NULL,
    [LegalEntityId]          INT             NOT NULL,
    [CostCentreId]           INT             NOT NULL,
    [UnitId]                 INT             NOT NULL,
    [AccountId]              INT             NOT NULL,
    [ClientId]               INT             NOT NULL,
    [SecurityId]             INT             NOT NULL,
    [ContractId]             INT             NOT NULL,
    [AmountCCY]              NUMERIC (18, 2) NOT NULL,
    [AmountGBP]              NUMERIC (18, 2) NOT NULL,
    [JournalLineDescription] NVARCHAR (200)  NULL,
    [RowAuditId]             INT             NOT NULL,
    PRIMARY KEY CLUSTERED ([EffectiveDate] ASC, [JournalId] ASC, [JournalLineNumber] ASC, [PostingCostCentreId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

